<template>
	<div>
		<keep-alive>
			<router-view v-if='$route.meta.keepAlive' v-on:footer='footer' style="margin-bottom: 1.3rem;"></router-view>
		</keep-alive>
		<router-view v-if='!$route.meta.keepAlive' v-on:footer='footer' :path='$route.path' style="margin-bottom: 1.3rem;"></router-view>
		<app-footer v-if='footer_show'></app-footer>
	</div>
</template>

<script>
	import Footer from './components/Public/Footer'
	window.addEventListener('beforeunload', e => {
		window.scrollTo(0, 0)
	})
	export default {
		name: 'App',
		data() {
			return {
				footer_show: true,
			}
		},
		components: {
			'app-footer': Footer
		},
		mounted() {

		},
		methods: {
			footer(flag) {
				this.footer_show = flag
			}
		}
	}
</script>

<style scoped lang="less">

</style>
